package shiyan2;

import java.util.List;

public class Test {
    public static void main(String[] args) {
        Teacher teacher1 = new Teacher("王老师",001,"男");
        Teacher teacher2 = new Teacher("张老师",002,"女");

        //王老师添加 课程1和课程2
        Course course1 = teacher1.addCourse(1,"线性代数","2202","8:00");
        Course course2 = teacher1.addCourse(2,"大学物理","2202","10:00");

        //张老师添加 课程3
        Course course3 = teacher2.addCourse(3,"HTML","A101","14:00");

        //实例化 学生1和学生2
        Student student1 = new Student("小吴",2021310862,"男");
        Student student2 = new Student("小徐",2021310800,"女");

        //学生1选课 课程1和课程2
        student1.selectCourse(course1);
        student1.selectCourse(course2);

        List<Course> courseList1 = student1.getCourseList();
        System.out.println("学生1【选课】【课程1和课程2】课程信息:");
        for (int i = 0; i < courseList1.size(); i++) {
            System.out.println(courseList1.get(i).getClassname());
        }

        //学生1退课 课程1
        student1.unSelectCourse(course1);
        System.out.println("学生1【退课】【课程1】后课程信息:");
        for (int i = 0; i < courseList1.size(); i++) {
            System.out.println(courseList1.get(i).getClassname());
        }
    }
} 